From 6cb95565d65db56ef6292b41415951e72922e532 Mon Sep 17 00:00:00 2001 From: justbur Date: Wed, 18 Nov 2015 10:49:23 -0500 Subject: [PATCH] Ignore key translations only at top-level C-x 8 is a valid place to put translations for example --- which-key.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/which-key.el b/which-key.el index 75bd580d87d..7dea2c32139 100644 --- a/which-key.el +++ b/which-key.el @@ -1232,7 +1232,8 @@ alists. Returns a list (key separator description)." (let ((key-str-qt (regexp-quote (key-description which-key--current-prefix))) (buffer (current-buffer)) (ignore-bindings '("self-insert-command" "ignore" "ignore-event" "company-ignore")) - (ignore-keys-regexp "mouse-\\|wheel-\\|remap\\|drag-\\|scroll-bar\\|select-window\\|switch-frame")) + (ignore-keys-regexp "mouse-\\|wheel-\\|remap\\|drag-\\|scroll-bar\\|select-window\\|switch-frame") + (ignore-sections-regexp "\\(Key translations\\|Function key map translations\\|Input decoding map translations\\)")) (with-temp-buffer (let ((indent-tabs-mode t)) (describe-buffer-bindings buffer which-key--current-prefix)) @@ -1254,7 +1255,8 @@ alists. Returns a list (key separator description)." ((looking-at "^[ \t]*$") ;; ignore ) - ((not (string-match-p "translations:" header)) + ((or (not (string-match-p ignore-sections-regexp header)) + which-key--current-prefix) (let ((binding-start (save-excursion (and (re-search-forward "\t+" nil t) (match-end 0)))) -- 2.30.2